<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- 
        v-html和v-text都是向当前模板标签插入内容(覆盖原有内容)
          - v-html可以解析字符串中的标签
          - v-text不会解析字符串中的标签
        
        但是我们平时使用插值语法是最多的,比v-text和v-html方便

       -->
       <h2>插值语法</h2>
       <p>12{{msg}}12 <em>倾斜</em> </p>
       <h2>v-text</h2>
       <p v-text="msg"></p>
       <p v-text="'12'+msg+'12'">hhhh </p>
       <p v-text="content">aaaaaaaa</p>
       <h2>v-html</h2>
       <p v-html="msg"></p>
       <p v-html="'12'+msg+'12'">hhhh </p>
       <p v-html="content">aaaaaaaa</p>
    </div>
    <script>
        Vue.config.productionTip = false;
        
        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    msg:"hello Vue",
                    content:"<em>看完倾斜</em>"
                }
            }
        })
</script>
</body>

</html>